package org.example.hengshengexam;

public class OuterClass {
    private int num = 10;
    // 内部类
    class InnerClass {
        public void accessOuter() {
            System.out.println("外部类的私有成员 num: " + num);
        }
    }
    // 主方法测试
    public static void main(String[] args) {
        OuterClass outer = new OuterClass();
        InnerClass inner = outer.new InnerClass();
        inner.accessOuter();
    }
}